import request from "../utils/request";
import { AccountType, UserInfoType } from "../types/user.d";
//登录
export const userLogin = (account: AccountType) => {
  return request.post("login", account);
};

//更新用户信息
export const userUpdate = (
  userId: string,
  info: Pick<UserInfoType, "name" | "jobname" | "resume">,
  token: string
) => {
  return request.put(`users/${userId}`, info, {
    headers: {
      "X-LC-Session": token, //为本次更新请求携带额外的请求头
    },
  });
};
